<h1>New page</h1>

<% form_for(@page, :url=>book_pages_path(@page.book)) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :page_number %><br />
    <%= f.text_field :page_number %>
  </p>
  <p>
    <%= f.label :book %><br />
    <%= f.text_field :book %>
  </p>
  <p>
    <%= f.submit 'Create' %>
  </p>
<% end %>

<%= link_to 'Back', book_pages_path(@page.book) %>